﻿// <copyright file="RulesException.cs" company="Recipe Database">
//     Copyright (c) Recipe Database. All rights reserved.
// </copyright>
// <author>Bjarke Meier</author>
//-----------------------------------------------------------------------

namespace Core.Rules
{
  using System;
  using System.Runtime.Serialization;

  /// <summary>
  /// Exception type used in Core.Rules rules.
  /// </summary>
  [Serializable]
  public class RulesException : Exception
  {
    /// <summary>
    /// Initializes a new instance of the RulesException class.
    /// </summary>
    public RulesException()
    {
    }

    /// <summary>
    /// Initializes a new instance of the RulesException class.
    /// </summary>
    /// <param name="message">The exception message.</param>
    public RulesException(string message)
      : base(message)
    {
    }

    /// <summary>
    /// Initializes a new instance of the RulesException class.
    /// </summary>
    /// <param name="message">The exception message.</param>
    /// <param name="innerException">An inner exception containing further details.</param>
    public RulesException(string message, Exception innerException)
      : base(message, innerException)
    {
    }

    /// <summary>
    /// Initializes a new instance of the RulesException class.
    /// </summary>
    /// <param name="info">SerializationInfo object.</param>
    /// <param name="context">StreamingContext object.</param>
    protected RulesException(SerializationInfo info, StreamingContext context)
      : base(info, context)
    {
    }
  }
}